﻿@model _1._11._2015_BookReview.Models.BookViewModel



<div class="jumbotron">
    <h1>Book Details</h1>
</div>

<div class="row">
    <div class="col-md-12">
        <table class="table table-bordered table-striped">
            <tr>
                <th>Book</th>
                <th>Author</th>
                <th>Add Review</th>
            </tr>

            
                <tr>
                    <td>@Model.Title</td>
                    <td>@(Model.AuthorFName + " " + Model.AuthorLName)</td>
                    <td>@Html.ActionLink("Review Book", "Review", new { id = @Model.BookId })</td>
                </tr>


        </table>
        <h3>Book Reviews</h3>
        <table class="table table-bordered table-striped">
            <tr>
                <th>Book</th>
                <th>Author</th>
            </tr>

            @foreach(var r in Model.Reviews)
            {
                <tr>
                    <td>@r.Reviewer.ReviewerName</td>
                    <td>@r.Text</td>
                </tr>
            }

        </table>

    </div>
</div>

